#include <stdio.h>
#include <fcntl.h>

int main(int argc,char *argv[])
{
   int devnullfd = open("/dev/null",O_RDWR);
   int stderrfd = dup(2);
   dup2(devnullfd,2);
   fprintf(stderr, "You are so Naughty!!!\n");
   dup2(stderrfd,2);
   fprintf(stderr, "You are nice person!\n");;
   close(devnullfd);
}
